package com.wsjzzcbq.fallback;

import com.alibaba.csp.sentinel.slots.block.degrade.DegradeException;

/**
 * SentinelControllerFallback
 *
 * @author wsjz
 * @date 2023/10/08
 */
public class SentinelControllerFallback {

    public static String userAddrFallback() {
        return "熔断返回";
    }

    //https://github.com/alibaba/Sentinel/wiki/%E6%B3%A8%E8%A7%A3%E6%94%AF%E6%8C%81
    //下面处理方式不行，只要抛出异常，就会被包装成UndeclaredThrowableException
//    public static String userAddrFallback() throws DegradeException {
//        System.out.println("进入限流-----------");
//        throw new DegradeException("限流");
//    }
}
